package com.xiaoyu.lanling.feature.generosity

import com.xiaoyu.lanling.common.UTEvent
import com.xiaoyu.lanling.util.event
import com.xiaoyu.lanling.util.logEvent
import com.xiaoyu.lanling.util.prop

class GenerosityLogger {
    companion object {
        fun logPushReceived() {
            event(UTEvent.Generosity.GENEROSITY_PUSH_RECEIVED)
                    .logEvent()
        }

        fun logPushPresented() {
            event(UTEvent.Generosity.GENEROSITY_PUSH_PRESENTED)
                    .logEvent()
        }

        fun logPushClosed(duration: Long) {
            event(UTEvent.Generosity.GENEROSITY_CLOSED)
                    .prop("present_time", duration)
                    .logEvent()
        }
    }
}